package com.jd.rapid.rpc.client;

import java.util.Arrays;

public class Main {

    public static void main(String[] args) {
        User user=
                User.builder()
                .id("1")
                .age(20)
                .name("张三")
                .desc("programmer")
                .build();
        Group group=
                Group.builder()
                        .id("1")
                        .name("gorup")
                        .user(user)
                        .build();
        byte[] data=ProtosuffUtils.serialize(group);
        System.out.println("序列化："+ Arrays.toString(data));
        Group result=ProtosuffUtils.deserialize(data,Group.class);
        System.out.println("反序列化："+result.toString());
    }


}
